package gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 * @author Alexander Shidlovsky
 */

public class AboutDialog extends JDialog {
	private JLabel lblAbout;
	private JButton btnOk;
	private JPanel contentPane = new JPanel();

	public AboutDialog() {
		setTitle("About");
		setResizable(false);

		setContentPane(contentPane);
		getContentPane().setLayout(null);

		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

		setBounds(400, 200, 400, 300);

		lblAbout = new JLabel();
		lblAbout.setText("<html><center>Year 1 final project<br>"
				+ "Carletti - Production management system<br><br>"
				+ "Authors:<br>" + "Aleksandrs Sidlovskis<br>"
				+ "Aleksejs Kuprins<br>" + "Ceslovas Lopan<br><br><br>"
				+ "2012" + "</center></html>");
		lblAbout.setBounds(94, 10, 390, 200);

		btnOk = new JButton("OK");
		btnOk.setBounds(150, 220, 89, 23);
		btnOk.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0) {
				dispose();
			}
		});

		contentPane.add(lblAbout);
		contentPane.add(btnOk);

	}
}
